﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Students
{
    class Student
    {
        private int age;
        private string gender;
        private int grade;
        private string name;

        public Student(int age, string gender, int grade, string name)
        {
            if (age < 7 || age > 18)
            {
                throw new ArgumentException("Student's age must be between 7 and 18.");
            }

            if (gender.Equals("male") == false && gender.Equals("female") == false)
            {
                throw new ArgumentException("Invalid gender.Please input a valid value ->male/female");
            }

            if (name.Length < 10 || name.Length > 50)
            {
                throw new ArgumentException("Invalid lenght name. Must be in range [10,50]");
            }

            if (grade < 1 || grade > 11)
            {
                throw new ArgumentException("Invalid grade. Must be in range [1,11]");
            }

            this.age = age;
            this.gender = gender;
            this.grade = grade;
            this.name = name;
        }

        public int Age
        {
            get
            {
                return age;
            }
            private set
            {
                age = value;
            }
        }

        public string Gender
        {
            get
            {
                return gender;
            }
            private set
            {
                gender = value;
            }
        }

        public int Grade
        {
            get
            {
                return grade;
            }
            private set
            {
                grade = value;
            }
        }

        public string Name
        {
            get
            {
                return name;
            }
            private set
            {
                name = value;
            }
        }
    }
}
